-
-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add additional memory classes and do some cleanup #132
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
hiptopjones
commented
Feb 3, 2024
- Added a handful of memory types, including ConversationSummaryMemory, which keeps a running summary of the conversation, rather than the raw buffer of messages.
- Tried to clean up some of the memory classes and make them more consistent with langchain. Pulled in documentation for the classes where possible.
- Improved the memory example code to allow working with different memory types.
- LoadMemoryChain was demanding a specific memory type (ConversationBufferMemory), so I made changes there to allow using other types of memory.
- Code in GroupChat and ReActAgentExecutorChain was breaking some of the abstraction of the memory classes, so I tried to fix it. I am not sure how they are used or if those classes are actually in use, so I was unable to really test those changes.
- I tried to create a common place to handle message formatting. There is code all over the tree that does it similarly, but uses its own implementation. Suggest trying to unify that formatting where possible going forward.
HavenDV
reviewed
Feb 4, 2024
src/libs/LangChain.Core/Chains/StackableChains/Agents/GroupChat.cs
Outdated
Show resolved
Hide resolved
HavenDV
reviewed
Feb 4, 2024
src/libs/LangChain.Core/Chains/StackableChains/LoadMemoryChain.cs
Outdated
Show resolved
Hide resolved
HavenDV
reviewed
Feb 4, 2024
HavenDV
reviewed
Feb 4, 2024
Overall it looks very good. I love the detailed comments and attention to detail. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.